<?php

namespace App\Http\Middleware;

use Closure;

class LoginPageBGI
{
    /**
     * Handle an incoming request.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \Closure  $next
     * @return mixed
     */
    public function handle($request, Closure $next)
    {
        $host = $_SERVER['REQUEST_URI'];
        $arr = explode('/',$host);
         if(in_array('admin',$arr)){
            $bgiPath = '';
            if($bgiPath){
                view()->share('background',$bgiPath);
            }

        }
        return $next($request);
    }
}
